package cn.wolfcode.luowowo.common;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by wolfcode-lanxw
 * 处理系统异常
 */
public class CommonExceptionAdvice {
    @ExceptionHandler(BusinessException.class)
    @ResponseBody
    public Result handleBusinessException(BusinessException e){
        return Result.error(e.getCodeMsg());
    }
}
